check whether number is prime or not